<template>
    <div class="aboutMe">
        <div class="header">
            <van-nav-bar title="关于" left-text="" left-arrow @click-left="router.back()" />
        </div>
        <van-image :src="logo" />
        <div class="title">惠麦电商供应链平台</div>
        <div class="version">最新版本 {{ version }}</div>
        <div class="version">当前版本 {{ phoneVersion }}</div>
        <div class="qrs">
            <div class="download">下载二维码</div>
            <vue-qr class="code_content" ref="qrcode" :text="qrCodeValue" :size="500"></vue-qr>
        </div>
    </div>
</template>
<script setup lang="ts">
import { getVersion } from '@/api/productHome/index'
import { ref } from 'vue';
import vueQr from 'vue-qr/src/packages/vue-qr.vue';
import { useRouter } from "vue-router";
const logo = new URL("@/assets/productHome/icon_logo.png", import.meta.url).href;
const version = ref()
const qrCodeValue = ref('')
const router = useRouter();
const phoneVersion = localStorage.getItem('phoneVersion')
/** 获取版本信息 */
const getContent = async () => {
    const res = await getVersion()
    version.value = res.rows[0].editionName
    qrCodeValue.value = res.rows[0].editionUrl
}
getContent()
</script>
<style lang="less" scoped>
.aboutMe {
    text-align: center;
    background: #FFFFFF;
    width: 100%;
    height: 100vh;

    .header {
        background: linear-gradient(#CDECFF 0%, #FFFFFF 70%);
        filter: blur(0px);
        height: 90px;
        padding-top: 44px;
        box-sizing: border-box;

        :deep(.van-icon-arrow-left) {
            color: #1a1b1c !important;
        }

        :deep(.van-nav-bar) {
            background: none !important;
        }

        :deep(.van-nav-bar__content) {
            background-color: transparent !important;
        }
    }


    .van-image {
        width: 120px;
        height: 120px;
        margin-top: 35px;
        margin-bottom: 30px;
    }

    .title {
        font-weight: 600;
        font-size: 21px;
        color: #1A1B1C;
        letter-spacing: 1px;
    }

    .version {
        margin-top: 20px;
    }

    .download {
        font-weight: 400;
        font-size: 16px;
        color: #1A1B1C;
        letter-spacing: 1px;
        width: 100%;
        margin-bottom: 20px;
    }

    .qrs {
        align-content: center;
        justify-content: center;
        width: 315px;
        height: 315px;
        background: #F6FAFF;
        border-radius: 10px;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        margin: 20px auto;
    }

    .code_content {
        width: 195px;
        height: 195px;
    }
}
</style>